package cn.wolfcode.luowowo.comment.service;

import cn.wolfcode.luowowo.comment.domain.ScenicComment;
import cn.wolfcode.luowowo.comment.query.ScenicCommentQuery;
import org.springframework.data.domain.Page;

import java.util.List;

public interface IScenicCommentService {
    /**
     * 添加
     * @param comment
     * @return
     */
    ScenicComment save(ScenicComment comment);

    /**
     * 分页查询
     * @param qo
     * @return
     */
    Page query(ScenicCommentQuery qo);


    ScenicComment findById(String id);

    /**
     * 评论 点赞
     * @param toid 评论id
     * @param userId 用户id
     */
    void commentThumbUp(String toid, Long userId);

    /**
     * 根据用户id查询对应用户的点评列表
     * @param uid 用户id
     * @return
     */
    List<ScenicComment> queryListByUserId(Long uid);

    Long getCount(Long scenicId);
}
